package com.smartleanx.module.hrm.service.esign.temp.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.smartleanx.framework.mybatis.core.dataobject.BaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * e签报合同模板
 *
 * @author xzq
 * @since 2025-07-07 15:56:14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "e签报合同模板")
@TableName("hrm_e_contract_temp")
public class HrmEContractTemp implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "数据状态 0/删除 1/正常")
    @TableField(value = "data_status", fill = FieldFill.INSERT)
    private Integer dataStatus;

    @Schema(description = "合同模板名称")
    @TableField("temp_name")
    private String tempName;

    @Schema(description = "合同模板e签宝id")
    @TableField("temp_esign_id")
    private String tempEsignId;

    @Schema(description = "创建人名称")
    @TableField("temp_create_name")
    private String tempCreateName;

    @Schema(description = "修改人名称")
    @TableField("temp_update_name")
    private String tempUpdateName;

    @Schema(description = "模板状态 0/关闭 1/启用 2/草稿")
    @TableField("temp_status")
    private Integer tempStatus;

    @Schema(description = "业务类型名称")
    @TableField("temp_type_name")
    private String tempTypeName;

    @Schema(description = "业务类型id")
    @TableField("temp_type_id")
    private Long tempTypeId;

    @Schema(description = "签署截止时间")
    @TableField("temp_sign_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime tempSignEndTime;

    @Schema(description = "描述")
    @TableField("temp_desc")
    private String tempDesc;

    @Schema(description = "签署有效期/天数")
    @TableField("sign_time")
    private Integer signTime;

    @Schema(description = "租户id")
    @TableField("tenant_id")
    private Long tenantId;

    @Schema(description = "印章id")
    @TableField("seal_id")
    private Long sealId;

    @Schema(description = "是否为劳动合同")
    @TableField("labour_contract")
    private Integer labourContract;

    @Schema(description = "编号生成规则")
    @TableField("num_create_rule")
    private Integer numCreateRule;

    @Schema(description = "固定编码")
    @TableField("fixed_code")
    private String fixedCode;

    @Schema(description = "编码格式--发起日期")
    @TableField("code_time")
    private String codeTime;

    @Schema(description = "e签宝文件id")
    @TableField("temp_esign_file_id")
    private String tempEsignFileId;

    @Schema(description = "盖章方式 1/手动 2/自动")
    @TableField("seal_fall_type")
    private Integer sealFallType;

    @Schema(description = "是否有合同编号 0/无 1/有")
    @TableField("exist_number")
    private Integer existNumber;

    @Schema(description = "规则排序1/固定编码 2/发起日期 3/员工工号")
    @TableField("rule_sort")
    private String ruleSort;

    @Schema(description = "归档文件id")
    @TableField("archiving_file_id")
    private Long archivingFileId;

    @Schema(description = "是否开启签署顺序 0/否 1/是")
    @TableField("sign_sort_open")
    private Integer signSortOpen;

    @Schema(description = "创建时间")
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "所属公司")
    @TableField("corp_id")
    private String corpId;

    @Schema(description = "所属公司名称")
    @TableField("corp_name")
    private String corpName;

    @Schema(description = "合同档案文件id")
    @TableField("archiving_folder_id")
    private Long archivingFolderId;

    @Schema(description = "是否点击保存，作为轮询状态")
    @TableField("save_update_status")
    private Integer saveUpdateStatus;
}
